package com.jml.redis.手写redis.mapper;

import com.jml.redis.手写redis.entity.User;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserMapper {

	// 查询所有用户数据
	@Select("SELECT * FROM USERS ")
	List<User> getUsersAll();

	// 根据用户条件查询用户数据
	@Select("  SELECT * FROM USERS  WHERE NAME =#{name}")
	List<User> getUsers(String name);

	@Update(" UPDATE USERS SET AGE=21 WHERE NAME=#{NAME}")
	int update(@Param("name") String name);
}
